package com.toannv.gameController;

import com.toannv.card.card;

public class CheckPhom {
	public static boolean checkNgang(card[] Cards){
		if(Cards.length<3){
			return false;
		}
		
		else{
			card OneCard = new card(Cards[0]);
			
			for(int i=0; i<= Cards.length; i++){
				if(OneCard.compareNumber(Cards[i])){
					continue;
				}
				else return false;
			}
			
			return true;
		}
	}
	
	public static boolean checkDoc(card[] Cards){
		if(Cards.length<3){
			return false;
		}
		
		else{
			QuickSortCard Sort = new QuickSortCard();
			Sort.sortPoker(Cards);
			
			for(int i=0; i<Cards.length-1; i++){
				if(Cards[i].getNumber() == (Cards[i+1].getNumber() - 1)){
					continue;
				}
				else return false;
			}
			return true;
		}
	}
}
